<!DOCTYPE html>
<!-- saved from url=(0016)http://localhost -->
<html>
  <head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title>第4章函数的连续性</title>
    <style>
        body{
            margin: 0;
        }
        #content-info{
            width: auto;
            margin: 0 auto;
            text-align: center;
        }
        #author-info{
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }
        #title{
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            padding-top: 10px;
            margin-bottom: 2px;
            font-size: 34px;
            color: #505050;
        }
        .text{
            white-space:nowrap;
            text-overflow: ellipsis;
            display: inline-block;
            margin-right: 20px;
            margin-bottom: 2px;
            font-size: 20px;
            color: #8c8c8c;
        }
        #navBar{
            width: auto;
            height: auto;
            position: fixed;
            right:0;
            bottom: 0;
            background-color: #f0f3f4;
            overflow-y: auto;
            text-align: center;
        }
        #svg-container{
            width: 100%;
            overflow-x: scroll;
            min-width: 0px;
            margin: 0 10px;
            overflow: visible;
            position: relative;
        }
        #nav-thumbs{
            overflow-y: scroll;
            padding: 0 5px;
        }
        .nav-thumb{
            position: relative;
            margin: 10px auto;
        }
        .nav-thumb >p{
            text-align: center;
            font-size: 12px;
            margin: 4px 0 0 0;
        }
        .nav-thumb >div{
            position: relative;
            display: inline-block;
            border: 1px solid #c6cfd5;
        }
        .nav-thumb img{
            display: block;
        }
        #main-content{
            bottom: 0;
            left: 0;
            right: 0;
            background-color: #d0cfd8;
            display: flex;
            height: auto;
            flex-flow: row wrap;
            text-align:center;
        }
        #svg-container >svg{
            overflow: visible;
            display: block;
            margin:5px auto;
            margin-bottom: 5px;
        }
        #copyright{
            bottom: 0;
            left: 50%;
            margin: 5px auto;
            font-size: 16px;
            color: #515151;
        }
        #copyright >a{
            text-decoration: none;
            color: #77C;
        }
        .number{
            position: absolute;
            top:0;
            left:0;
            border-top:22px solid #08a1ef;
            border-right: 22px solid transparent;
        }
        .pagenum{
            font-size: 12px;
            color: #fff;
            position: absolute;
            top: -23px;
            left: 2px;
        }
            #navBar::-webkit-scrollbar{
            width: 8px;
            background-color: #f5f5f5;
        }
            #navBar::-webkit-scrollbar-track{
            -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,.3);
            border-radius: 8px;
            background-color: #fff;
        }
            #navBar::-webkit-scrollbar-thumb{
            border-radius: 8px;
            -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,.3);
            background-color: #6b6b70;
        }
        #navBar::-webkit-scrollbar-thumb:hover{
            background-color: #4a4a4f;
        }
</style>
  </head>
  <body>
    <div id="main-area">
      <div id="content-info">
        <div id="content-info">
          <div id="title">第4章函数的连续性</div>
        </div>
        <div id="author-info">
          <div class="text" id="author-name">RUWU</div>
          <div class="text" id="share-time">2024-02-19</div>
        </div>
      </div>
      <div id="main-content">
        <div id="svg-container"><svg id="page0" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" ed:name="画布 1" width="2559" viewBox="0 0 2559 2108" preserveAspectRadio="xMinYMin meet" ed:hSpacing="30" xmlns="http://www.w3.org/2000/svg" ed:vSpacing="30" height="2108" xmlns:ed="https://www.edrawsoft.com/xml/2017/SVGExtensions/">
    <style type="text/css"><![CDATA[
g[ed\:togtopicid],g[ed\:hyperlink],g[ed\:comment],g[ed\:note] {cursor:pointer;}
g[id] {-moz-user-select: none;-ms-user-select: none;user-select: none;}
svg text::selection,svg tspan::selection{background-color: #4285f4;color: #ffffff;fill: #ffffff;}
.st15 {fill:#141414;font-family:楷体;font-size:13pt}
.st18 {fill:#141414;font-family:楷体;font-size:14pt;font-weight:bold}
.st19 {fill:#141414;font-family:楷体;font-size:14pt}
.st17 {fill:#141414;font-family:楷体;font-size:18pt}
.st16 {fill:#2196f3;font-family:楷体;font-size:28pt;font-weight:bold}
.st20 {fill:#ffffff;font-family:楷体;font-size:14pt}
]]></style>
    <defs/>
    <rect fill="#ffffff" x="0" y="0" width="2559" height="2108"/>
    <path stroke="#2196f3" transform="matrix(1,0,0,1,658.8,311.67)" id="104" ed:idlist="121,123,123" fill-opacity="0.2" ed:type="boundary" fill="#2196f3" stroke-linejoin="round" ed:parentid="121" stroke-dasharray="3.8,1.2" d="M8,0L888.2,0C893.6,0,896.2,2.6,896.2,8L896.2,51.6C896.2,57,893.6,59.6,888.2,59.6L8,59.6C2.6,59.6,0,57,0,51.6L0,8C0,2.6,2.6,0,8,0z"/>
    <path stroke="#2196f3" transform="matrix(1,0,0,1,706.8,714.22)" id="148" ed:idlist="163,165,165" fill-opacity="0.2" ed:type="boundary" fill="#2196f3" stroke-linejoin="round" ed:parentid="163" stroke-dasharray="3.8,1.2" d="M8,0L1015.6,0C1021,0,1023.6,2.6,1023.6,8L1023.6,52.6C1023.6,58,1021,60.6,1015.6,60.6L8,60.6C2.6,60.6,0,58,0,52.6L0,8C0,2.6,2.6,0,8,0z"/>
    <path stroke="#2196f3" transform="matrix(1,0,0,1,706.8,867.24)" id="149" ed:idlist="175,177,177,180,180" fill-opacity="0.2" ed:type="boundary" fill="#2196f3" stroke-linejoin="round" ed:parentid="175" stroke-dasharray="3.8,1.2" d="M8,0L861.2,0C866.6,0,869.2,2.6,869.2,8L869.2,84.3C869.2,89.7,866.6,92.3,861.2,92.3L8,92.3C2.6,92.3,0,89.7,0,84.3L0,8C0,2.6,2.6,0,8,0z"/>
    <path stroke="#2196f3" transform="matrix(1,0,0,1,706.8,966.04)" id="150" ed:idlist="182,184,184,187,187,189,189,192,192,195,195,198,198" fill-opacity="0.2" ed:type="boundary" fill="#2196f3" stroke-linejoin="round" ed:parentid="182" stroke-dasharray="3.8,1.2" d="M8,0L1823.2,0C1828.6,0,1831.2,2.6,1831.2,8L1831.2,264.2C1831.2,269.6,1828.6,272.2,1823.2,272.2L8,272.2C2.6,272.2,0,269.6,0,264.2L0,8C0,2.6,2.6,0,8,0z"/>
    <path stroke="#2196f3" transform="matrix(1,0,0,1,2290.6,555.51)" id="151" ed:idlist="152,154,154,157,157,160,160" ed:type="summary" fill="none" stroke-linejoin="round" ed:parentid="152" d="M0,0L6,0L6,71L12,76.1L6,81.2L6,152.2L0,152.2"/>
    <path stroke="#2196f3" transform="matrix(1,0,0,1,730.8,1611.22)" id="225" ed:idlist="226,228,228,231,231" fill-opacity="0.2" ed:type="boundary" fill="#2196f3" stroke-linejoin="round" ed:parentid="226" stroke-dasharray="3.8,1.2" d="M8,0L719.6,0C725,0,727.6,2.6,727.6,8L727.6,89.9C727.6,95.2,725,97.9,719.6,97.9L8,97.9C2.6,97.9,0,95.2,0,89.9L0,8C0,2.6,2.6,0,8,0z"/>
    <g transform="matrix(1,0,0,1,1448.4,1678.32)" id="244" ed:fromid="225" ed:type="relation" ed:toid="235">
        <path fill="none" d="M10,-51C240.7,-71.9,325,34.3,-10,51"/>
        <path stroke="#2cd551" stroke-width="3" stroke-linecap="round" fill="none" stroke-linejoin="round" stroke-dasharray="3.8,1.2" d="M18.6,-51.7C240.8,-69.1,319.4,32.7,-1.4,50.6"/>
        <path stroke-width="1" stroke="#2cd551" stroke-linecap="round" fill="#2cd551" d="M10,-51C9.8,-53.4,11.6,-55.5,14,-55.7C16.3,-55.9,18.4,-54.1,18.6,-51.7C18.8,-49.4,17.1,-47.3,14.7,-47.1C12.3,-46.9,10.2,-48.6,10,-51"/>
        <path stroke-width="1" stroke="#2cd551" stroke-linecap="round" fill="#2cd551" d="M-1.1,54.9L-10,51L-1.6,46.2L-1.1,54.9"/>
        <rect fill="#ffffff" x="155.2" y="-23.7" width="35.6" height="20"/>
        <text class="st15">
            <tspan style="white-space:pre" x="193" y="-6.9" textLength="35.60">推导</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1368.4,1770.75)" id="245" ed:fromid="235" ed:type="relation" ed:toid="238">
        <path fill="none" d="M70,-28.1C234.9,-24.7,176.7,58.3,-70,28.1"/>
        <path stroke="#ff6f00" stroke-width="3" stroke-linecap="round" fill="none" stroke-linejoin="round" stroke-dasharray="3.8,1.2" d="M78.7,-27.9C230.9,-21.8,173.7,55.8,-61.4,29.1"/>
        <path stroke-width="1" stroke="#ff6f00" stroke-linecap="round" fill="#ff6f00" d="M70,-28.1C70.1,-30.5,72.1,-32.4,74.5,-32.3C76.8,-32.3,78.7,-30.3,78.7,-27.9C78.6,-25.5,76.6,-23.6,74.2,-23.7C71.8,-23.7,69.9,-25.7,70,-28.1"/>
        <path stroke-width="1" stroke="#ff6f00" stroke-linecap="round" fill="#ff6f00" d="M-61.9,33.4L-70,28.1L-60.9,24.8L-61.9,33.4"/>
        <rect fill="#ffffff" x="109" y="3" width="35.6" height="20"/>
        <text class="st15">
            <tspan style="white-space:pre" x="135" y="19.8" textLength="35.60">推导</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1532.4,1534.08)" id="246" ed:fromid="202" ed:type="relation" ed:toid="238">
        <path fill="none" d="M322.6,-266.9C625,-268.3,172.7,552,-322.6,266.9"/>
        <path stroke="#ff6f00" stroke-width="3" stroke-linecap="round" fill="none" stroke-linejoin="round" stroke-dasharray="3.8,1.2" d="M331.3,-266.7C614.7,-252.5,172.4,541,-315.1,271.1"/>
        <path stroke-width="1" stroke="#ff6f00" stroke-linecap="round" fill="#ff6f00" d="M322.6,-266.9C322.7,-269.2,324.6,-271.1,327,-271.1C329.4,-271,331.3,-269.1,331.3,-266.7C331.2,-264.3,329.2,-262.4,326.8,-262.4C324.4,-262.5,322.5,-264.5,322.6,-266.9"/>
        <path stroke-width="1" stroke="#ff6f00" stroke-linecap="round" fill="#ff6f00" d="M-317.2,274.9L-322.6,266.9L-312.9,267.3L-317.2,274.9"/>
        <rect fill="#ffffff" x="224.8" y="96.8" width="35.6" height="20"/>
        <text class="st15">
            <tspan style="white-space:pre" x="280" y="113.6" textLength="35.60">推导</tspan>
        </text>
    </g>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,349.35,667.47)" stroke-linecap="round" id="103" fill="none" ed:tosuperid="102" stroke-linejoin="round" ed:parentid="101" d="M67.5,364.1L99,364.1L99,-364.1L130.4,-364.1"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,652.3,226.61)" stroke-linecap="round" id="106" fill="none" ed:tosuperid="105" stroke-linejoin="round" ed:parentid="102" d="M-13.5,76.8L0,76.8L0,-76.8L13.5,-76.8"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,927.7,113.45)" stroke-linecap="round" id="108" fill="none" ed:tosuperid="107" stroke-linejoin="round" ed:parentid="105" d="M-13.5,36.4L0,36.4L0,-36.4L13.5,-36.4"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,927.7,145.63)" stroke-linecap="round" id="111" fill="none" ed:tosuperid="110" stroke-linejoin="round" ed:parentid="105" d="M0,4.2L0,-4.2L13.5,-4.2"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,927.7,186.25)" stroke-linecap="round" id="114" fill="none" ed:tosuperid="113" stroke-linejoin="round" ed:parentid="105" d="M0,-36.4L0,36.4L13.5,36.4"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,652.3,304.28)" stroke-linecap="round" id="117" fill="none" ed:tosuperid="116" stroke-linejoin="round" ed:parentid="102" d="M0,-0.9L0,0.9L13.5,0.9"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,867.7,305.17)" stroke-linecap="round" id="119" fill="none" ed:tosuperid="118" stroke-linejoin="round" ed:parentid="116" d="M-13.5,0L0,0L13.5,0"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,652.3,333.83)" stroke-linecap="round" id="122" fill="none" ed:tosuperid="121" stroke-linejoin="round" ed:parentid="102" d="M0,-30.4L0,30.4L13.5,30.4"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,928.5,364.28)" stroke-linecap="round" id="124" fill="none" ed:tosuperid="123" stroke-linejoin="round" ed:parentid="121" d="M-13.5,0L0,0L13.5,0"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,652.3,380.15)" stroke-linecap="round" id="127" fill="none" ed:tosuperid="126" stroke-linejoin="round" ed:parentid="102" d="M0,-76.8L0,76.8L13.5,76.8"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,847.7,440.51)" stroke-linecap="round" id="129" fill="none" ed:tosuperid="128" stroke-linejoin="round" ed:parentid="126" d="M-13.5,16.4L0,16.4L0,-16.4L13.5,-16.4"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,847.7,473.31)" stroke-linecap="round" id="132" fill="none" ed:tosuperid="131" stroke-linejoin="round" ed:parentid="126" d="M0,-16.4L0,16.4L13.5,16.4"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,932.7,473.31)" stroke-linecap="round" id="134" fill="none" ed:tosuperid="133" stroke-linejoin="round" ed:parentid="131" d="M-13.5,16.4L0,16.4L0,-16.4L13.5,-16.4"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,1077.7,456.91)" stroke-linecap="round" id="136" fill="none" ed:tosuperid="135" stroke-linejoin="round" ed:parentid="133" d="M-13.5,0L0,0L13.5,0"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,932.7,489.71)" stroke-linecap="round" id="138" fill="none" ed:tosuperid="137" stroke-linejoin="round" ed:parentid="131" d="M0,0L13.5,0"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,1077.7,489.71)" stroke-linecap="round" id="140" fill="none" ed:tosuperid="139" stroke-linejoin="round" ed:parentid="137" d="M-13.5,0L0,0L13.5,0"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,932.7,506.11)" stroke-linecap="round" id="142" fill="none" ed:tosuperid="141" stroke-linejoin="round" ed:parentid="131" d="M0,-16.4L0,16.4L13.5,16.4"/>
    <path stroke="#fa8155" transform="matrix(1,0,0,1,1097.7,522.51)" stroke-linecap="round" id="144" fill="none" ed:tosuperid="143" stroke-linejoin="round" ed:parentid="141" d="M-13.5,0L0,0L13.5,0"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,349.35,1070)" stroke-linecap="round" id="146" fill="none" ed:tosuperid="145" stroke-linejoin="round" ed:parentid="101" d="M67.5,-38.4L99,-38.4L99,38.4L130.4,38.4"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,700.3,881.75)" stroke-linecap="round" id="153" fill="none" ed:tosuperid="152" stroke-linejoin="round" ed:parentid="145" d="M-13.5,226.7L0,226.7L0,-226.7L13.5,-226.7"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,858.1,628.73)" stroke-linecap="round" id="155" fill="none" ed:tosuperid="154" stroke-linejoin="round" ed:parentid="152" d="M-13.5,26.3L0,26.3L0,-26.3L13.5,-26.3"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,858.1,654.97)" stroke-linecap="round" id="158" fill="none" ed:tosuperid="157" stroke-linejoin="round" ed:parentid="152" d="M0,0.1L13.5,-0.1"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,858.1,681.39)" stroke-linecap="round" id="161" fill="none" ed:tosuperid="160" stroke-linejoin="round" ed:parentid="152" d="M0,-26.3L0,26.3L13.5,26.3"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,700.3,938.14)" stroke-linecap="round" id="164" fill="none" ed:tosuperid="163" stroke-linejoin="round" ed:parentid="145" d="M0,170.3L0,-170.3L13.5,-170.3"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,986.9,767.84)" stroke-linecap="round" id="166" fill="none" ed:tosuperid="165" stroke-linejoin="round" ed:parentid="163" d="M-13.5,0L0,0L13.5,0"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,700.3,976.39)" stroke-linecap="round" id="169" fill="none" ed:tosuperid="168" stroke-linejoin="round" ed:parentid="145" d="M0,132.1L0,-132.1L13.5,-132.1"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,925.3,836.14)" stroke-linecap="round" id="171" fill="none" ed:tosuperid="170" stroke-linejoin="round" ed:parentid="168" d="M-13.5,8.2L0,8.2L0,-8.2L13.5,-8.2"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,925.3,852.54)" stroke-linecap="round" id="174" fill="none" ed:tosuperid="173" stroke-linejoin="round" ed:parentid="168" d="M0,-8.2L0,8.2L13.5,8.2"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,700.3,1022.29)" stroke-linecap="round" id="176" fill="none" ed:tosuperid="175" stroke-linejoin="round" ed:parentid="145" d="M0,86.2L0,-86.2L13.5,-86.2"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,996.5,927.94)" stroke-linecap="round" id="178" fill="none" ed:tosuperid="177" stroke-linejoin="round" ed:parentid="175" d="M-13.5,8.2L0,8.2L0,-8.2L13.5,-8.2"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,996.5,944.34)" stroke-linecap="round" id="181" fill="none" ed:tosuperid="180" stroke-linejoin="round" ed:parentid="175" d="M0,-8.2L0,8.2L13.5,8.2"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,700.3,1116.95)" stroke-linecap="round" id="183" fill="none" ed:tosuperid="182" stroke-linejoin="round" ed:parentid="145" d="M0,-8.5L0,8.5L13.5,8.5"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,956.5,1072.58)" stroke-linecap="round" id="185" fill="none" ed:tosuperid="184" stroke-linejoin="round" ed:parentid="182" d="M-13.5,52.9L0,52.9L0,-52.9L13.5,-52.9"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,956.5,1098.94)" stroke-linecap="round" id="188" fill="none" ed:tosuperid="187" stroke-linejoin="round" ed:parentid="182" d="M0,26.5L0,-26.5L13.5,-26.5"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,1161.5,1072.42)" stroke-linecap="round" id="190" fill="none" ed:tosuperid="189" stroke-linejoin="round" ed:parentid="187" d="M-13.5,-0L0,-0L13.5,0"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,956.5,1161.94)" stroke-linecap="round" id="193" fill="none" ed:tosuperid="192" stroke-linejoin="round" ed:parentid="182" d="M0,-36.5L0,36.5L13.5,36.5"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,1149.5,1198.42)" stroke-linecap="round" id="196" fill="none" ed:tosuperid="195" stroke-linejoin="round" ed:parentid="192" d="M-13.5,0L0,0L13.5,0"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,956.5,1178.34)" stroke-linecap="round" id="199" fill="none" ed:tosuperid="198" stroke-linejoin="round" ed:parentid="182" d="M0,-52.9L0,52.9L13.5,52.9"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,700.3,1201.17)" stroke-linecap="round" id="201" fill="none" ed:tosuperid="200" stroke-linejoin="round" ed:parentid="145" d="M0,-92.7L0,92.7L13.5,92.7"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,996.5,1293.89)" stroke-linecap="round" id="203" fill="none" ed:tosuperid="202" stroke-linejoin="round" ed:parentid="200" d="M-13.5,-0L0,-0L13.5,0"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,700.3,1265.27)" stroke-linecap="round" id="206" fill="none" ed:tosuperid="205" stroke-linejoin="round" ed:parentid="145" d="M0,-156.8L0,156.8L13.5,156.8"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,935.7,1387.01)" stroke-linecap="round" id="208" fill="none" ed:tosuperid="207" stroke-linejoin="round" ed:parentid="205" d="M-13.5,35.1L0,35.1L0,-35.1L13.5,-35.1"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,935.7,1457.18)" stroke-linecap="round" id="211" fill="none" ed:tosuperid="210" stroke-linejoin="round" ed:parentid="205" d="M0,-35.1L0,35.1L13.5,35.1"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,1236.7,1492.26)" stroke-linecap="round" id="214" fill="none" ed:tosuperid="213" stroke-linejoin="round" ed:parentid="210" d="M-13.5,-0L0,-0L13.5,0"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,700.3,1335.14)" stroke-linecap="round" id="216" fill="none" ed:tosuperid="215" stroke-linejoin="round" ed:parentid="145" d="M0,-226.7L0,226.7L13.5,226.7"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,996.5,1553.63)" stroke-linecap="round" id="218" fill="none" ed:tosuperid="217" stroke-linejoin="round" ed:parentid="215" d="M-13.5,8.2L0,8.2L0,-8.2L13.5,-8.2"/>
    <path stroke="#ffad36" transform="matrix(1,0,0,1,996.5,1570.03)" stroke-linecap="round" id="221" fill="none" ed:tosuperid="220" stroke-linejoin="round" ed:parentid="215" d="M0,-8.2L0,8.2L13.5,8.2"/>
    <path stroke="#b7c82b" transform="matrix(1,0,0,1,349.35,1395.63)" stroke-linecap="round" id="224" fill="none" ed:tosuperid="223" stroke-linejoin="round" ed:parentid="101" d="M67.5,-364.1L99,-364.1L99,364.1L130.4,364.1"/>
    <path stroke="#b7c82b" transform="matrix(1,0,0,1,724.3,1722.71)" stroke-linecap="round" id="227" fill="none" ed:tosuperid="226" stroke-linejoin="round" ed:parentid="223" d="M-13.5,37L0,37L0,-37L13.5,-37"/>
    <path stroke="#b7c82b" transform="matrix(1,0,0,1,850.9,1677.5)" stroke-linecap="round" id="229" fill="none" ed:tosuperid="228" stroke-linejoin="round" ed:parentid="226" d="M-13.5,8.2L0,8.2L0,-8.2L13.5,-8.2"/>
    <path stroke="#b7c82b" transform="matrix(1,0,0,1,850.9,1693.9)" stroke-linecap="round" id="232" fill="none" ed:tosuperid="231" stroke-linejoin="round" ed:parentid="226" d="M0,-8.2L0,8.2L13.5,8.2"/>
    <path stroke="#b7c82b" transform="matrix(1,0,0,1,724.3,1770.53)" stroke-linecap="round" id="234" fill="none" ed:tosuperid="233" stroke-linejoin="round" ed:parentid="223" d="M0,-10.8L0,10.8L13.5,10.8"/>
    <path stroke="#b7c82b" transform="matrix(1,0,0,1,1050.9,1771.54)" stroke-linecap="round" id="236" fill="none" ed:tosuperid="235" stroke-linejoin="round" ed:parentid="233" d="M-13.5,9.8L0,9.8L0,-9.8L13.5,-9.8"/>
    <path stroke="#b7c82b" transform="matrix(1,0,0,1,1050.9,1791.14)" stroke-linecap="round" id="239" fill="none" ed:tosuperid="238" stroke-linejoin="round" ed:parentid="233" d="M0,-9.8L0,9.8L13.5,9.8"/>
    <path stroke="#b7c82b" transform="matrix(1,0,0,1,724.3,1796.73)" stroke-linecap="round" id="241" fill="none" ed:tosuperid="240" stroke-linejoin="round" ed:parentid="223" d="M0,-37L0,37L13.5,37"/>
    <path stroke="#b7c82b" transform="matrix(1,0,0,1,902.9,1833.74)" stroke-linecap="round" id="243" fill="none" ed:tosuperid="242" stroke-linejoin="round" ed:parentid="240" d="M-13.5,0L0,0L13.5,0"/>
    <g transform="matrix(1,0,0,1,21,994.95)" ed:layout="rightmap" id="101" ed:topictype="mainidea" ed:height="73.2" ed:width="395.8">
        <path stroke="#2196f3" fill="none" stroke-linejoin="round" d="M4,0L391.8,0C394.5,0,395.8,1.3,395.8,4L395.8,69.2C395.8,71.9,394.5,73.2,391.8,73.2L4,73.2C1.3,73.2,0,71.9,0,69.2L0,4C0,1.3,1.3,0,4,0z"/>
        <text class="st16">
            <tspan style="white-space:pre" x="20" y="53.1">第四章函数的连续性</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,479.8,281.78)" id="102" ed:parentid="101" ed:height="43.2" ed:width="159">
        <text class="st17">
            <tspan style="white-space:pre" x="18" y="32.5">连续性概念</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,665.8,123.55)" id="105" ed:parentid="102" ed:height="26.3" ed:width="248.4">
        <path fill="#ffffff" d="M0,0L248.4,0L248.4,26.3L0,26.3L0,0z"/>
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L248.4,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定义1（函数在一点连续）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,941.2,19)" id="107" ed:parentid="105" ed:height="58.0499" ed:width="651">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,58L651,58"/>
        <use transform="translate(7,2)" xlink:href="#image65" x="0" y="0" width="637" height="53"/>
    </g>
    <symbol id="image65">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,941.2,83.55)" id="110" ed:parentid="105" ed:height="57.8708" ed:width="573">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,57.9L573,57.9"/>
        <use transform="translate(7,2)" xlink:href="#image66" x="0" y="0" width="559" height="52"/>
    </g>
    <symbol id="image66">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,941.2,147.92)" id="113" ed:parentid="105" ed:height="74.7274" ed:width="835">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,74.7L835,74.7"/>
        <use transform="translate(7,2)" xlink:href="#image67" x="0" y="0" width="821" height="69"/>
    </g>
    <symbol id="image67">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,665.8,278.87)" id="116" ed:parentid="102" ed:height="26.3" ed:width="188.4">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L188.4,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定义2（左右连续）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,881.2,229.15)" id="118" ed:parentid="116" ed:height="76.027" ed:width="370">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,76L370,76"/>
        <use transform="translate(7,2)" xlink:href="#image68" x="0" y="0" width="356" height="71"/>
    </g>
    <symbol id="image68">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,665.8,337.98)" id="121" ed:parentid="102" ed:height="26.3" ed:width="249.2">
        <path fill="#ff3c00" d="M0,0L249.2,0L249.2,26.3L0,26.3L0,0z"/>
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L249.2,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定理4.1（连续充要条件）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,942,318.67)" id="123" ed:parentid="121" ed:height="45.6006" ed:width="606">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,45.6L606,45.6"/>
        <use transform="translate(7,2)" xlink:href="#image69" x="0" y="0" width="592" height="40"/>
    </g>
    <symbol id="image69">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,665.8,430.61)" id="126" ed:parentid="102" ed:height="26.3" ed:width="168.4">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L168.4,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定义3（间断点）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,861.2,377.78)" id="128" ed:parentid="126" ed:height="46.3382" ed:width="1055">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,46.3L1055,46.3"/>
        <use transform="translate(7,2)" xlink:href="#image70" x="0" y="0" width="1041" height="41"/>
    </g>
    <symbol id="image70">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,861.2,463.41)" id="131" ed:parentid="126" ed:height="26.3" ed:width="58">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L58,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">分类</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,946.2,430.61)" id="133" ed:parentid="131" ed:height="26.3" ed:width="118">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L118,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">可去间断点</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1091.2,430.61)" id="135" ed:parentid="133" ed:height="26.3" ed:width="210">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L210,26.3"/>
        <text class="st19">
            <tspan style="white-space:pre" x="8" y="21.5">极限存在，但该点间断</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,946.2,463.41)" id="137" ed:parentid="131" ed:height="26.3" ed:width="118">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L118,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">跳跃间断点</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1091.2,463.41)" id="139" ed:parentid="137" ed:height="26.3" ed:width="210">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L210,26.3"/>
        <text class="st19">
            <tspan style="white-space:pre" x="8" y="21.5">左右极限存在，但不等</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,946.2,496.21)" id="141" ed:parentid="131" ed:height="26.3" ed:width="138">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L138,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">第二类间断点</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1111.2,496.21)" id="143" ed:parentid="141" ed:height="26.3" ed:width="190.8">
        <path stroke="#fa8155" fill="none" stroke-linejoin="round" d="M0,26.3L190.8,26.3"/>
        <text class="st19">
            <tspan style="white-space:pre" x="8" y="21.5">至少一侧极限不存在</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,479.8,1086.84)" id="145" ed:parentid="101" ed:height="43.2" ed:width="207">
        <text class="st17">
            <tspan style="white-space:pre" x="18" y="32.5">连续函数的性质</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,713.8,628.76)" id="152" ed:parentid="145" ed:height="26.3" ed:width="130.8">
        <path fill="#ff3c00" d="M0,0L130.8,0L130.8,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L130.8,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定理4.2-4.4</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,871.6,555.51)" id="154" ed:parentid="152" ed:height="46.89" ed:width="555">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,46.9L555,46.9"/>
        <use transform="translate(7,2)" xlink:href="#image71" x="0" y="0" width="541" height="41"/>
    </g>
    <symbol id="image71">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,871.6,608.9)" id="157" ed:parentid="152" ed:height="45.9697" ed:width="1414">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,46L1414,46"/>
        <use transform="translate(7,2)" xlink:href="#image72" x="0" y="0" width="1400" height="40"/>
    </g>
    <symbol id="image72">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,871.6,661.37)" id="160" ed:parentid="152" ed:height="46.3499" ed:width="813">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,46.3L813,46.3"/>
        <use transform="translate(7,2)" xlink:href="#image73" x="0" y="0" width="799" height="41"/>
    </g>
    <symbol id="image73">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,713.8,741.54)" id="163" ed:parentid="145" ed:height="26.3" ed:width="259.6">
        <path fill="#ff3c00" d="M0,0L259.6,0L259.6,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L259.6,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定义4.5(复合函数连续性）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1000.4,721.22)" id="165" ed:parentid="163" ed:height="46.6182" ed:width="723">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,46.6L723,46.6"/>
        <use transform="translate(7,2)" xlink:href="#image74" x="0" y="0" width="709" height="41"/>
    </g>
    <symbol id="image74">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,713.8,818.04)" id="168" ed:parentid="145" ed:height="26.3" ed:width="198">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L198,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">引理（有界性定理）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,938.8,781.34)" id="170" ed:parentid="168" ed:height="46.5952" ed:width="608">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,46.6L608,46.6"/>
        <use transform="translate(7,2)" xlink:href="#image75" x="0" y="0" width="594" height="41"/>
    </g>
    <symbol id="image75">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,938.8,834.44)" id="173" ed:parentid="168" ed:height="26.3" ed:width="248.4">
        <path fill="#05a8f4" d="M0,0L248.4,0L248.4,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L248.4,26.3"/>
        <text class="st19">
            <tspan style="white-space:pre" x="8" y="21.5">致密性定理和归结原理证的</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,713.8,909.84)" id="175" ed:parentid="145" ed:height="26.3" ed:width="269.2">
        <path fill="#ff3c00" d="M0,0L269.2,0L269.2,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L269.2,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定理4.6（最大最小值定理）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1010,874.24)" id="177" ed:parentid="175" ed:height="45.4994" ed:width="559">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,45.5L559,45.5"/>
        <use transform="translate(7,2)" xlink:href="#image76" x="0" y="0" width="545" height="40"/>
    </g>
    <symbol id="image76">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,1010,926.24)" id="180" ed:parentid="175" ed:height="26.3" ed:width="190.8">
        <path fill="#0288d1" d="M0,0L190.8,0L190.8,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L190.8,26.3"/>
        <text class="st19">
            <tspan style="white-space:pre" x="8" y="21.5">引理和确界原理证的</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,713.8,1099.16)" id="182" ed:parentid="145" ed:height="26.3" ed:width="229.2">
        <path fill="#ff3c00" d="M0,0L229.2,0L229.2,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L229.2,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定理4.7（介质性定理）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,970,973.03)" id="184" ed:parentid="182" ed:height="46.6585" ed:width="1517">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,46.7L1517,46.7"/>
        <use transform="translate(7,2)" xlink:href="#image77" x="0" y="0" width="1503" height="41"/>
    </g>
    <symbol id="image77">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,970,1046.12)" id="187" ed:parentid="182" ed:height="26.3" ed:width="178">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L178,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">推论（根存在性）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1175,1026.2)" id="189" ed:parentid="187" ed:height="46.2312" ed:width="1356">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,46.2L1356,46.2"/>
        <use transform="translate(7,2)" xlink:href="#image78" x="0" y="0" width="1342" height="41"/>
    </g>
    <symbol id="image78">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,970,1078.92)" id="192" ed:parentid="182" ed:height="119.5" ed:width="166">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,119.5L166,119.5"/>
        <use transform="translate(7,2)" xlink:href="#image79" x="0" y="0" width="152" height="114"/>
    </g>
    <symbol id="image79">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,1163,1084.92)" id="195" ed:parentid="192" ed:height="113.5" ed:width="157">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,113.5L157,113.5"/>
        <use transform="translate(7,2)" xlink:href="#image80" x="0" y="0" width="143" height="108"/>
    </g>
    <symbol id="image80">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,970,1204.92)" id="198" ed:parentid="182" ed:height="26.3" ed:width="325.2">
        <path fill="#05a8f4" d="M0,0L325.2,0L325.2,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L325.2,26.3"/>
        <text class="st19">
            <tspan style="white-space:pre" x="8" y="21.5">确界原理和连续函数局部保号性证的</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,713.8,1267.59)" id="200" ed:parentid="145" ed:height="26.3" ed:width="269.2">
        <path fill="#ff3c00" d="M0,0L269.2,0L269.2,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L269.2,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定理4.8（反函数的连续性）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1010,1244.73)" id="202" ed:parentid="200" ed:height="49.1629" ed:width="845">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,49.2L845,49.2"/>
        <use transform="translate(7,2)" xlink:href="#image81" x="0" y="0" width="831" height="44"/>
    </g>
    <symbol id="image81">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,713.8,1395.8)" id="205" ed:parentid="145" ed:height="26.3" ed:width="208.4">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L208.4,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定义2（一致连续性）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,949.2,1300.39)" id="207" ed:parentid="205" ed:height="51.5457" ed:width="1515">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,51.5L1515,51.5"/>
        <use transform="translate(7,2)" xlink:href="#image82" x="0" y="0" width="1501" height="46"/>
    </g>
    <symbol id="image82">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,949.2,1358.44)" id="210" ed:parentid="205" ed:height="133.824" ed:width="274">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,133.8L274,133.8"/>
        <use transform="translate(7,2)" xlink:href="#image83" x="0" y="0" width="260" height="128"/>
    </g>
    <symbol id="image83">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,1250.2,1467.86)" id="213" ed:parentid="210" ed:height="24.4" ed:width="35">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,24.4L35,24.4"/>
        <g ed:hyperlink="[&#xa;    {&#xa;        &quot;desc&quot;: &quot;&quot;,&#xa;        &quot;link&quot;: &quot;https://www.matongxue.com/madocs/21/&quot;&#xa;    }&#xa;]&#xa;">
            <use transform="translate(10,4)" xlink:href="#imghyperlink"/>
        </g>
    </g>
    <symbol id="imghyperlink">
        <image xlink:href="" width="16" height="16"/>
    </symbol>
    <g transform="matrix(1,0,0,1,713.8,1535.53)" id="215" ed:parentid="145" ed:height="26.3" ed:width="269.2">
        <path fill="#ff3c00" d="M0,0L269.2,0L269.2,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L269.2,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定理4.9（一致连续性定理）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1010,1498.76)" id="217" ed:parentid="215" ed:height="46.6702" ed:width="516">
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,46.7L516,46.7"/>
        <use transform="translate(7,2)" xlink:href="#image84" x="0" y="0" width="502" height="41"/>
    </g>
    <symbol id="image84">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,1010,1551.93)" id="220" ed:parentid="215" ed:height="26.3" ed:width="248.4">
        <path fill="#05a8f4" d="M0,0L248.4,0L248.4,26.3L0,26.3L0,0z"/>
        <path stroke="#ffad36" fill="none" stroke-linejoin="round" d="M0,26.3L248.4,26.3"/>
        <text class="st19">
            <tspan style="white-space:pre" x="8" y="21.5">致密性定理和归结原理证的</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,2311.6,616.22)" ed:layout="rightmap" id="222" ed:parentid="151" ed:height="30.8" ed:width="170.6">
        <path fill="#2196f3" d="M0,0L170.6,0L170.6,30.8L0,30.8L0,0z"/>
        <text class="st20">
            <tspan style="white-space:pre" x="7" y="23.9">函数极限定理证得</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,479.8,1738.12)" id="223" ed:parentid="101" ed:height="43.2" ed:width="231">
        <text class="st17">
            <tspan style="white-space:pre" x="18" y="32.5">初等函数的连续性</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,737.8,1659.4)" id="226" ed:parentid="223" ed:height="26.3" ed:width="99.59999999999999">
        <path fill="#ff3c00" d="M0,0L99.6,0L99.6,26.3L0,26.3L0,0z"/>
        <path stroke="#b7c82b" fill="none" stroke-linejoin="round" d="M0,26.3L99.6,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定理4.10</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,864.4,1618.22)" id="228" ed:parentid="226" ed:height="51.0736" ed:width="587">
        <path stroke="#b7c82b" fill="none" stroke-linejoin="round" d="M0,51.1L587,51.1"/>
        <use transform="translate(7,2)" xlink:href="#image85" x="0" y="0" width="573" height="46"/>
    </g>
    <symbol id="image85">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,864.4,1675.8)" id="231" ed:parentid="226" ed:height="26.3" ed:width="210">
        <path fill="#0288d1" d="M0,0L210,0L210,26.3L0,26.3L0,0z"/>
        <path stroke="#b7c82b" fill="none" stroke-linejoin="round" d="M0,26.3L210,26.3"/>
        <text class="st19">
            <tspan style="white-space:pre" x="8" y="21.5">第一章指数函数的定义</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,737.8,1755.04)" id="233" ed:parentid="223" ed:height="26.3" ed:width="299.6">
        <path fill="#ff3c00" d="M0,0L299.6,0L299.6,26.3L0,26.3L0,0z"/>
        <path stroke="#b7c82b" fill="none" stroke-linejoin="round" d="M0,26.3L299.6,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定义4.11（指数函数的连续性）</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,1064.4,1715.6)" id="235" ed:parentid="233" ed:height="46.138" ed:width="374">
        <path stroke="#b7c82b" fill="none" stroke-linejoin="round" d="M0,46.1L374,46.1"/>
        <use transform="translate(7,2)" xlink:href="#image86" x="0" y="0" width="360" height="41"/>
    </g>
    <symbol id="image86">
        <image xlink:href="" width="100%" height="100%" preserveAspectRatio="none"/>
    </symbol>
    <g transform="matrix(1,0,0,1,1064.4,1768.24)" id="238" ed:parentid="233" ed:height="32.7" ed:width="234">
        <path stroke="#b7c82b" fill="none" stroke-linejoin="round" d="M0,32.7L234,32.7"/>
        <text class="st17">
            <tspan style="white-space:pre" x="8" y="27.1">对数函数也是连续的</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,737.8,1807.44)" id="240" ed:parentid="223" ed:height="26.3" ed:width="151.6">
        <path fill="#ff3c00" d="M0,0L151.6,0L151.6,26.3L0,26.3L0,0z"/>
        <path stroke="#b7c82b" fill="none" stroke-linejoin="round" d="M0,26.3L151.6,26.3"/>
        <text class="st18">
            <tspan style="white-space:pre" x="8" y="21.5">定义4.12-4.13</tspan>
        </text>
    </g>
    <g transform="matrix(1,0,0,1,916.4,1807.44)" id="242" ed:parentid="240" ed:height="26.3" ed:width="363.6">
        <path stroke="#b7c82b" fill="none" stroke-linejoin="round" d="M0,26.3L363.6,26.3"/>
        <text class="st19">
            <tspan style="white-space:pre" x="8" y="21.5">一切初等函数都是它定义域上的连续函数</tspan>
        </text>
    </g>
</svg>
</div>
        <div id="copyright">Created With  <a href="https://www.edrawsoft.com/" target="_blank" title="edrawsoft">MindMaster</a></div>
      </div>
    </div>
    <script>eval(atob('dmFyIG11YSA9IHdpbmRvdy5uYXZpZ2F0b3IudXNlckFnZW50Ow0KdmFyIHVhID0gKG11YS5pbmRleE9mKCdydjoxMScpICsgbXVhLmluZGV4T2YoJ01TSUUnKSkgPj0gMDsNCmRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdzdmctY29udGFpbmVyJykub25jb250ZXh0bWVudSA9IGZ1bmN0aW9uIChldmVudCkgew0KICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7DQp9DQpkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnc3ZnLWNvbnRhaW5lcicpLm9ubW91c2Vkb3duID0gZnVuY3Rpb24gKGV2ZW50KSB7DQogICAgaWYgKGV2ZW50LndoaWNoID09IDMpIHsNCiAgICAgICAgdGhpcy5zdHlsZS5jdXJzb3IgPSAncG9pbnRlcic7DQogICAgICAgIHRoaXMub25tb3VzZW1vdmUgPSBmdW5jdGlvbiAoZXYpIHsNCiAgICAgICAgICAgIHRoaXMuc2Nyb2xsQnkoLShldi5tb3ZlbWVudFgpLCAwKTsNCiAgICAgICAgICAgIHdpbmR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udCA9IHRpbWU7DQogICAgICAgICAgICB0LnNldEF0dHJpYnV0ZSgnZm9udC1zaXplJywgJzEwJyk7DQogICAgICAgICAgICBtLnNldEF0dHJpYnV0ZSgndHJhbnNmb3JtJywgJ3RyYW5zbGF0ZSgyMCwyNyknKTsNCiAgICAgICAgICAgIG0uc2V0QXR0cmlidXRlKCdmb250LXNpemUnLCAnMTInKTsNCiAgICAgICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgbWVzc2FnZUFyci5sZW5ndGg7IGsrKykgew0KICAgICAgICAgICAgICAgIHZhciB0cyA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnROUygnaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnLCAndHNwYW4nKTsNCiAgICAgICAgICAgICAgICB0cy5zZXRBdHRyaWJ1dGUoJ3gnLCAnMCcpOw0KICAgICAgICAgICAgICAgIHRzLnNldEF0dHJpYnV0ZSgneScsIGsgKiAxNik7DQogICAgICAgICAgICAgICAgdHMudGV4dENvbnRlbnQgPSBtZXNzYWdlQXJyW2tdOw0KICAgICAgICAgICAgICAgIG0uYXBwZW5kQ2hpbGQodHMpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgby5zZXRBdHRyaWJ1dGUoJ3RyYW5zZm9ybScsICd0cmFuc2xhdGUoMCwnICsgaGVpZ2h0ICsgJyknKTsNCiAgICAgICAgICAgIG8uYXBwZW5kQ2hpbGQobik7DQogICAgICAgICAgICBvLmFwcGVuZENoaWxkKHQpOw0KICAgICAgICAgICAgby5hcHBlbmRDaGlsZChtKTsNCiAgICAgICAgICAgIGNhcnIucHVzaChvKTsNCiAgICAgICAgICAgIHBvcHVwLmFwcGVuZENoaWxkKG8pOw0KICAgICAgICAgICAgaGVpZ2h0ID0gKG1lc3NhZ2VBcnIubGVuZ3RoICsgMSkgKiAxNiArIGhlaWdodDsNCiAgICAgICAgfQ0KICAgICAgICB2YXIgd2FyciA9IGdldGN3aChwb3B1cCk7DQogICAgICAgIG9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AgICAgICAgICAgICAgICB2YXIgeDEgPSB4ICogbWFBcnJbMF0gKyB5ICogbWFBcnJbMl0gKyBtYUFycls0XTsNCiAgICAgICAgICAgICAgICB2YXIgeTEgPSB4ICogbWFBcnJbMV0gKyB5ICogbWFBcnJbM10gKyBtYUFycls1XTsNCiAgICAgICAgICAgICAgICB4MSA9IHgxLnRvc3VpdHN2ZygpOw0KICAgICAgICAgICAgICAgIHkxID0geTEudG9zdWl0c3ZnKCk7DQogICAgICAgICAgICAgICAgdmFyIHRyc3RyID0gJ3RyYW5zbGF0ZSgnICsgeDEgKyAnLCcgKyB5MSArICcpJzsNCiAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgdmFyIHggPSBwYXJzZUZsb2F0KGNzWzBdKSArIDE2Ow0KICAgICAgICAgICAgICAgIHZhciB5ID0gcGFyc2VGbG9hdChjc1sxXSkgKyAxNjsNCiAgICAgICAgICAgICAgICB2YXIgeDEgPSB4ICogbWFBcnJbMF0gKyB5ICogbWFBcnJbMl0gKyBtYUFycls0XTsNCiAgICAgICAgICAgICAgICB2YXIgeTEgPSB4ICogbWFBcnJbMV0gKyB5ICogbWFBcnJbM10gKyBtYUFycls1XTsNCiAgICAgICAgICAgICAgICB4ID0gcGFyc2VGbG9hdChjc1swXSkgKyAxNjsNCiAgICAgICAgICAgICAgICB5ID0gcGFyc2VGbG9hdChjc1sxXSk7DQogICAgICAgICAgICAgICAgdmFyIHgyID0geCAqIG1hQXJyWzBdICsgeSAqIG1hQXJyWzJdICsgbWFBcnJbNF07DQogICAgICAgICAgICAgICAgdmFyIHkyID0geCAqIG1hQXJyWzFdICsgeSAqIG1hQXJyWzNdICsgbWFBcnJbNV07DQogICAgICAgICAgICAgICAgdmFyIGZ4ID0geDEgPCB4MiA/IHgxLnRvc3VpdHN2ZygpIDogeDIudG9zdWl0c3ZnKCk7DQogICAgICAgICAgICAgICAgdmFyIGZ5ID0geTEgPiB5MiA/IHkxLnRvc3VpdHN2ZygpI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snOw0KICAgICAgICBtYWlucC5zdHlsZS5tYXhXaWR0aCA9ICc0MDBweCc7DQogICAgICAgIG1haW5wLnN0eWxlLndvcmRCcmVhayA9ICdicmVhay1hbGwnOw0KICAgICAgICBtYWlucC5pbm5lckhUTUwgPSBwOw0KICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKG1haW5wKTsNCiAgICAgICAgdmFyIHcgPSBtYWlucC5jbGllbnRXaWR0aDsNCiAgICAgICAgdmFyIGggPSBtYWlucC5jbGllbnRIZWlnaHQ7DQogICAgICAgIGRvY3VtZW50LmJvZHkucmVtb3ZlQ2hpbGQobWFpbnApOw0KICAgICAgICByZXR1cm4gW3csIGhdDQogICAgfQ0KICAgIHN2Z0VsZW1zID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgic3ZnIik7DQogICAgZm9yIChsZXQgaW5kZXggPSAxOyBpbmRleCA8PSBzdmdFbGVtcy5sZW5ndGg7IGluZGV4KyspIHsNCiAgICAgICAgdmFyIG5vdGVzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnc3ZnOm50aC1jaGlsZCgnICsgaW5kZXggKyAnKSBnPmdbZWRcXDpub3RlXScpOw0KICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG5vdGVzLmxlbmd0aDsgaSsrKSB7DQogICAgICAgICAgICB2YXIgYSA9IG5vdGVzW2ldLmdldEF0dHJpYnV0ZSgnZWQ6bm90ZScpOw0KICAgICAgICAgICAgdmFyIG5vdGVMb2NrID0gbm90ZXNbaV0uZ2V0QXR0cmlidXRlKCdlZDpub3RlbG9jaycpOw0KICAgICAgICAgICAgaWYgKG5vdGVMb2NrID09ICd0cnVlJykgew0KICAgICAgICAgICAgICAgIGNvbnRpbnVlOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgdmFyIG1haW5wID0gYS5tYXRjaCgvPGJvZHlbXj5dKj4oLiopPFwvYm9keT4vKVsxXTsNCiAgICAgICAgICAgIHZhciB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XIgeSA9IHBhcnNlRmxvYXQoY3NbMV0pICsgMTY7DQogICAgICAgICAgICAgICAgICAgIHZhciB4MSA9IHggKiBtYUFyclswXSArIHkgKiBtYUFyclsyXSArIG1hQXJyWzRdOw0KICAgICAgICAgICAgICAgICAgICB2YXIgeTEgPSB4ICogbWFBcnJbMV0gKyB5ICogbWFBcnJbM10gKyBtYUFycls1XTsNCiAgICAgICAgICAgICAgICAgICAgeDEgPSB4MS50b3N1aXRzdmcoKTsNCiAgICAgICAgICAgICAgICAgICAgeTEgPSB5MS50b3N1aXRzdmcoKTsNCiAgICAgICAgICAgICAgICAgICAgdmFyIHRyc3RyID0gJ3RyYW5zbGF0ZSgnICsgeDEgKyAnLCcgKyB5MSArICcpJzsNCiAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICB2YXIgeCA9IHBhcnNlRmxvYXQoY3NbMF0pICsgMTY7DQogICAgICAgICAgICAgICAgICAgIHZhciB5ID0gcGFyc2VGbG9hdChjc1sxXSkgKyAxNjsNCiAgICAgICAgICAgICAgICAgICAgdmFyIHgxID0geCAqIG1hQXJyWzBdICsgeSAqIG1hQXJyWzJdICsgbWFBcnJbNF07DQogICAgICAgICAgICAgICAgICAgIHZhciB5MSA9IHggKiBtYUFyclsxXSArIHkgKiBtYUFyclszXSArIG1hQXJyWzVdOw0KICAgICAgICAgICAgICAgICAgICB4ID0gcGFyc2VGbG9hdChjc1swXSkgKyAxNjsNCiAgICAgICAgICAgICAgICAgICAgeSA9IHBhcnNlRmxvYXQoY3NbMV0pOw0KICAgICAgICAgICAgICAgICAgICB2YXIgeDIgPSB4ICogbWFBcnJbMF0gKyB5ICogbWFBcnJbMl0gKyBtYUFycls0XTsNCiAgICAgICAgICAgICAgICAgICAgdmFyIHkyID0geCAqIG1hQXJyWzFdICsgeSAqIG1hQXJyWzNdICsgbWFBcnJbNV07DQogICAgICAgICAgICAgICAgICAgIHZhciBmeCA9IHgxIDwgeDIgPyB4MS50b3N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ICAgICAgICAgICAgeCA9IHgudG9zdWl0c3ZnKCk7DQogICAgICAgICAgICB5ID0geS50b3N1aXRzdmcoKTsNCiAgICAgICAgICAgIHZhciB0cnN0ciA9ICd0cmFuc2xhdGUoJyArIHggKyAnLCcgKyB5ICsgJyknOw0KICAgICAgICB9IGVsc2UgaWYgKHBzLnN1YnN0cigwLCAyKSA9PSAnbWEnKSB7DQogICAgICAgICAgICB2YXIgcHBzID0gcHMubWF0Y2goLyhcLT9cZCsoXC5cZCspPylbXCwgXShcLT9cZCsoXC5cZCspPylbXCwgXShcLT9cZCsoXC5cZCspPylbXCwgXShcLT9cZCsoXC5cZCspPylbXCwgXShcLT9cZCsoXC5cZCspPylbXCwgXShcLT9cZCsoXC5cZCspPylcKSQvKTsNCiAgICAgICAgICAgIHZhciBtYUFyciA9IFtwYXJzZUZsb2F0KHBwc1sxXSksIHBhcnNlRmxvYXQocHBzWzNdKSwgcGFyc2VGbG9hdChwcHNbNV0pLCBwYXJzZUZsb2F0KHBwc1s3XSksIHBhcnNlRmxvYXQocHBzWzldKSwgcGFyc2VGbG9hdChwcHNbMTFdKV07DQogICAgICAgICAgICBpZiAobWFBcnJbMV0gPT0gMCkgew0KICAgICAgICAgICAgICAgIHZhciB4ID0gcGFyc2VGbG9hdChjc1swXSk7DQogICAgICAgICAgICAgICAgdmFyIHkgPSBwYXJzZUZsb2F0KGNzWzFdKSArIDE2Ow0KICAgICAgICAgICAgICAgIHZhciB4MSA9IHggKiBtYUFyclswXSArIHkgKiBtYUFyclsyXSArIG1hQXJyWzRdOw0KICAgICAgICAgICAgICAgIHZhciB5MSA9IHggKiBtYUFyclsxXSArIHkgKiBtYUFyclszXSArIG1hQXJyWzVdOw0KICAgICAgICAgICAgICAgIHgxID0geDEudG9zdWl0c3ZnKCk7DQogICAgICAgICAgICAgICAgeTEgPSB5MS50b3N1aXRzdmcoKTsNCiAgICAgICAgICAgICAgICB2YXIgdHJzdHIgPSAndHJhbnNsYXRlKCcgKyB4MSArICcsJyArIHkxICsgJyknOw0KICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICB2YXIgeCA9IHBhcnNlRmxvYXQoY3NbMF0pICsgMTY7DQogICAgICAgICAgICAgICAgdmFyIHkgPSBwYXJzZUZsb2F0KGNzWzFdKSArIDE2Ow0KICAgICAgICAgICAgICAgIHZhciB4MSA9IHggKiBtYUFyclswXSArIHkgKiBtYUFyclsyXSArIG1hQXJyWzRdOw0KICAgICAgICAgICAgICAgIHZhciB5MSA9IHggKiBtYUFyclsxXSArIHkgKiBtYUFyclszXSArIG1hQXJyWzVdOw0KICAgICAgICAgICAgICAgIHggPSBwYXJzZUZsb2F0KGNzWzBdKSArIDE2Ow0KICAgICAgICAgICAgICAgIHkgPSBwYXJzZUZsb2F0KGNzWzFdKTsNCiAgICAgICAgICAgICAgICB2YXIgeDIgPSB4ICogbWFBcnJbMF0gKyB5ICogbWFBcnJbMl0gKyBtYUFycls0XTsNCiAgICAgICAgICAgICAgICB2YXIgeTIgPSB4ICogbWFBcnJbMV0gKyB5ICogbWFBcnJbM10gKyBtYUFycls1XTsNCiAgICAgICAgICAgICAgICB2YXIgZnggPSB4MSA8IHgyID8geDEudG9zdWl0c3ZnKCkgOiB4Mi50b3N1aXRzdmcoKTsNCiAgICAgICAgICAgICAgICB2YXIgZnkgPSB5MSA+IHkyID8geTEudG9zdWl0c3ZnKCkgOiB5Mi50b3N1aXRzdmcoKTsNCiAgICAgICAgICAgICAgICB2YXIgb2ZmeSA9IE1hdGguYWJzKHkxIC0geTIpOw0KICAgICAgICAgICAgICAgIHZhciB0cnN0ciA9ICd0cmFuc2xhdGUoJyArIGZ4ICsgJywnICsgZnkgKyAnKSc7DQogICAgICAgICAgICAgICAgcG9wdXBSLnNldEF0dHJpYnV0ZSgnaGVpZ2h0Jywgb2ZmeS50b1N0cmluZygpKTsNCiAgICAgICAgICAgICAgICBwb3B1cFIuc2V0QXR0cmlidXRlKCd3aWR0aCcsICcxNicpOw0KICAg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aW5rYXJyW2tdKSkgew0KICAgICAgICAgICAgICAgIGMuc2V0QXR0cmlidXRlTlMoImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiwgInhsaW5rIiwgImh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiKTsNCiAgICAgICAgICAgICAgICBjLnNldEF0dHJpYnV0ZU5TKCJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiwgImhyZWYiLCBsaW5rYXJyW2tdKTsNCiAgICAgICAgICAgICAgICBjLnNldEF0dHJpYnV0ZSgndGFyZ2V0JywgJ19ibGFuaycpOw0KICAgICAgICAgICAgICAgIGUudGV4dENvbnRlbnQgPSBsaW5rYXJyW2tdOw0KICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICBlLnRleHRDb250ZW50ID0gJ1BhZ2UtJyArIGxpbmthcnJba107DQogICAgICAgICAgICAgICAgYy5zZXRBdHRyaWJ1dGVOUygiaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLCAieGxpbmsiLCAiaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIpOw0KICAgICAgICAgICAgICAgIGMuc2V0QXR0cmlidXRlTlMoImh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiLCAiaHJlZiIsICIjIiArIGxpbmthcnJba10pOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZC5zZXRBdHRyaWJ1dGUoJ3dpZHRoJywgbWF4ICsgMTApOw0KICAgICAgICAgICAgZC5zZXRBdHRyaWJ1dGUoJ2hlaWdodCcsICczMycpOw0KICAgICAgICAgICAgZC5zZXRBdHRyaWJ1dGUoJ3N0cm9rZScsICcjOTk5OTk5Jyk7DQogICAgICAgICAgICBkLnNldEF0dHJpYnV0ZSgnZmlsbCcsICd3aGl0ZScpOw0KICAgICAgICAgICAgZC5zZXRBdHRyaWJ1dGUoJ3knLCAzMyAqIGspOw0KICAgICAgICAgICAgZi50ZXh0Q29udGVudCA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SgnZWQ6aGVpZ2h0Jyk7DQogICAgaWYgKHR5cGUpIHsNCiAgICAgICAgb2JqWyJtIiArIGlkXS50eXBlID0gdHlwZTsNCiAgICB9DQogICAgaWYgKGl3ICYmIGloKSB7DQogICAgICAgIG9ialsibSIgKyBpZF0ud2lkdGggPSBpdzsNCiAgICAgICAgb2JqWyJtIiArIGlkXS5oZWlnaHQgPSBpaDsNCiAgICB9DQogICAgaWYgKHJlbGFmcm9tLmxlbmd0aCAhPT0gMCkgew0KICAgICAgICBvYmpbIm0iICsgaWRdLnJlbGFmcm9tID0ge307DQogICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmVsYWZyb20ubGVuZ3RoOyBpKyspIHsNCiAgICAgICAgICAgIHZhciBpbmRleGlkID0gcmVsYWZyb21baV0uaWQ7DQogICAgICAgICAgICB2YXIgdG9pZCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKGluZGV4aWQpLmdldEF0dHJpYnV0ZSgnZWQ6dG9pZCcpOw0KICAgICAgICAgICAgaWYgKGV4dHJhUmVsYVtpbmRleGlkXSA9PT0gdW5kZWZpbmVkKSB7DQogICAgICAgICAgICAgICAgZXh0cmFSZWxhW2luZGV4aWRdID0gew0KICAgICAgICAgICAgICAgICAgICBpZDogaW5kZXhpZCwNCiAgICAgICAgICAgICAgICAgICAgZnJvbWlkOiBpZCwNCiAgICAgICAgICAgICAgICAgICAgdG9pZDogdG9pZCwNCiAgICAgICAgICAgICAgICAgICAgaXNDOiBmYWxzZQ0KICAgICAgICAgICAgICAgIH07DQogICAgICAgICAgICB9DQogICAgICAgICAgICBvYmpbIm0iICsgaWRdLnJlbGFmcm9tW2luZGV4aWRdID0ge307DQogICAgICAgICAgICBvYmpbIm0iICsgaWRdLnJlbGFmcm9tLmRpc3BsYXkgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChpZCkuc3R5bGUuZGlzcGxheSAhPT0gJ25vbmUnID8gJ2Jsb2NrJyA6ICdub25lJzsNCiAgICAgICAgfQ0KICAgIH0NCiAgICBpZiAocmVsYXRvLmxlbmd0aCAhPT0gMCkgew0KICAgICAgICBvYmpbIm0iICsgaWRdLnJlbGF0byA9IHt9Ow0KICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJlbGF0by5sZW5ndGg7IGkrKykgew0KICAgICAgICAgICAgdmFyIGluZGV4aWQgPSByZWxhdG9baV0uaWQ7DQogICAgICAgICAgICB2YXIgZnJvbWlkID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoaW5kZXhpZCkuZ2V0QXR0cmlidXRlKCdlZDpmcm9taWQnKTsNCiAgICAgICAgICAgIGlmIChleHRyYVJlbGFbaW5kZXhpZF0gPT09IHVuZGVmaW5lZCkgew0KICAgICAgICAgICAgICAgIGV4dHJhUmVsYVtpbmRleGlkXSA9IHsNCiAgICAgICAgICAgICAgICAgICAgaWQ6IGluZGV4aWQsDQogICAgICAgICAgICAgICAgICAgIGZyb21pZDogZnJvbWlkLA0KICAgICAgICAgICAgICAgICAgICB0b2lkOiBpZCwNCiAgICAgICAgICAgICAgICAgICAgaXNDOiBmYWxzZQ0KICAgICAgICAgICAgICAgIH07DQogICAgICAgICAgICB9DQogICAgICAgICAgICBvYmpbIm0iICsgaWRdLnJlbGF0b1tpbmRleGlkXSA9IHt9Ow0KICAgICAgICAgICAgb2JqWyJtIiArIGlkXS5yZWxhdG8uZGlzcGxheSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKGlkKS5zdHlsZS5kaXNwbGF5ICE9PSAnbm9uZScgPyAnYmxvY2snIDogJ25vbmUnOw0KICAgICAgICB9DQogICAgfQ0KICAgIGlmIChjaGlsZHMubGVuZ3RoICE9PSAwKSB7DQogICAgICAgIG9ialsibSIgKyBpZF0uY2hpbGQgPSB7fTsNCiAgICAgICAgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoImdbZWRcXDp0b2d0b3BpY2lkPSciICsgaWQgKyAiJ10iKSkgew0KICAgICAgIC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w0KICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IGNoYWluQXJyLmxlbmd0aDsgaSsrKSB7DQogICAgICAgICAgICB2YXIgYSA9IGNoYWluQXJyW2ldOw0KICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBPYmplY3Qua2V5cyhvYmopLmxlbmd0aDsgaisrKSB7DQogICAgICAgICAgICAgICAgdmFyIGNvYmogPSBvYmpbT2JqZWN0LmtleXMob2JqKVtqXV1bYV07DQogICAgICAgICAgICAgICAgaWYgKGNvYmopIHsNCiAgICAgICAgICAgICAgICAgICAgb2JqID0gY29iajsNCiAgICAgICAgICAgICAgICAgICAgY29udGludWUNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9DQogICAgICAgIH0NCiAgICAgICAgcmV0dXJuIG9iag0KICAgIH0gZWxzZSB7DQogICAgICAgIHZhciBvYmogPSBkYXRhVHJlZVttYWluXTsNCiAgICAgICAgcmV0dXJuIG9iag0KICAgIH0NCg0KfQ0KZm9yICh2YXIgaSA9IDA7IGkgPCBzaGFwZS5sZW5ndGg7IGkrKykgew0KICAgIHNoYXBlW2ldLm9uY2xpY2sgPSBmdW5jdGlvbiAoKSB7DQogICAgICAgIHZhciBpZCA9IE51bWJlcih0aGlzLmdldEF0dHJpYnV0ZSgnZWQ6dG9ndG9waWNpZCcpKTsNCiAgICAgICAgdmFyIG9iaiA9IGdldG9iaihpZCk7DQoNCiAgICAgICAgdmFyIHR5cGUgPSBvYmoudG9ndHlwZSA9PT0gJ21pbnVzJyA/ICdwbHVzJyA6ICdtaW51cyc7DQogICAgICAgIHZhciBkaXNwbGF5ID0gb2JqLnRvZ3R5cGUgPT09ICdtaW51cycgPyAnbm9uZScgOiAnYmxvY2snOw0KICAgICAgICB0aGlzLmdldEVsZW1lbnRzQnlUYWdOYW1lKCd1c2UnKVswXS5zZXRBdHRyaWJ1dGUoJ3hsaW5rOmhyZWYnLCAnIycgKyB0eXBlKTsNCiAgICAgICAgb2JqLnRvZ3R5cGUgPSB0eXBlOw0KICAgICAgICBjaGVja0lEID0gb2JqOw0KDQogICAgICAgIHV0ZChvYmosIGlkLCBkaXNwbGF5KTsNCiAgICAgICAgZXh0cmFSZWxhRmluKCk7DQogICAgfQ0KfQ0KZnVuY3Rpb24gdXRkKG9iaiwgaWQsIHNob3csIG9jKSB7DQoNCiAgICB2YXIgcHNob3cgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChpZCkuc3R5bGUuZGlzcGxheSAhPT0gJ25vbmUnID8gJ2Jsb2NrJyA6ICdub25lJzsNCiAgICBpZiAob2JqLnJlbGFmcm9tKSB7DQogICAgICAgIGlmIChvYmoucmVsYWZyb20uZGlzcGxheSAhPT0gcHNob3cpIHsNCiAgICAgICAgICAgIHZhciByZWxhZnJvbXMgPSBPYmplY3Qua2V5cyhvYmoucmVsYWZyb20pOw0KICAgICAgICAgICAgcmVsYWZyb21zLnNwbGljZShyZWxhZnJvbXMuaW5kZXhPZignZGlzcGxheScpLCAxKTsNCiAgICAgICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgcmVsYWZyb21zLmxlbmd0aDsgaysrKSB7DQogICAgICAgICAgICAgICAgdmFyIGQgPSByZWxhZnJvbXNba107DQogICAgICAgICAgICAgICAgZXh0cmFSZWxhW2RdLmlzQyA9IHRydWU7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBvYmoucmVsYWZyb20uZGlzcGxheSA9IHBzaG93Ow0KICAgICAgICB9DQogICAgfQ0KICAgIGlmIChvYmoucmVsYXRvKSB7DQogICAgICAgIGlmIChvYmoucmVsYXRvLmRpc3BsYXkgIT09IHBzaG93KSB7DQogICAgICAgICAgICB2YXIgcmVsYXRvcyA9IE9iamVjdC5rZXlzKG9iai5yZWxhdG8pOw0KICAgICAgICAgICAgcmVsYXRvcy5zcGxpY2UocmVsYXRvcy5pbmRleE9mKCdkaXNwbGF5JyksIDEpOw0KICAgICAgICAgICAgZm9yICh2YXIgayA9IDA7IGsgPCByZWxhdG9zLmxlbmd0aDsgaysrKSB7DQogICAgICAgICAgICAgICAgdmFyIGQgPSByZWxhdG9zW2tdOw0KICAgICAgICAgICAgICAgIGV4dHJhUmVsYVtkXS5pc0MgPSB0cnVlOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgb2JqLnJlbGF0by5kaXNwbGF5ID0gcHNob3c7DQogICAgICAgIH0NCiAgICB9DQogICAgaWYgKG9iai5jYWxsKSB7DQogICAgICAgIHZhciBjYWxscyA9IE9iamVjdC5rZXlzKG9iai5jYWxsKTsNCiAgICAgICAgaWYgKGNoZWNrSUQgIT09IG9iaikgew0KICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjYWxscy5sZW5ndGg7IGkrKykgew0KICAgICAgICAgICAgICAgIHZhciBhID0gY2FsbHNbaV0uc2xpY2UoMSk7DQogICAgICAgICAgICAgICAgdmFyIGIgPSBvYmouY2FsbFtjYWxsc1tpXV07DQogICAgICAgICAgICAgICAgdmFyIGMgPSBiLnRvZ3R5cGU7DQogICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoYSkuc3R5bGUuZGlzcGxheSA9IHNob3c7DQogICAgICAgICAgICAgICAgaWYgKGIucmVsYWZyb20gJiYgIWMpIHsNCiAgICAgICAgICAgICAgICAgICAgaWYgKGIucmVsYWZyb20uZGlzcGxheSAhPT0gc2hvdykgew0KICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlbGFmcm9tcyA9IE9iamVjdC5rZXlzKGIucmVsYWZyb20pOw0KICAgICAgICAgICAgICAgICAgICAgICAgcmVsYWZyb21zLnNwbGljZShyZWxhZnJvbXMuaW5kZXhPZignZGlzcGxheScpLCAxKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgcmVsYWZyb21zLmxlbmd0aDsgaysrKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSByZWxhZnJvbXNba107DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmFSZWxhW2RdLmlzQyA9IHRydWU7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICBiLnJlbGFmcm9tLmRpc3BsYXkgPSBzaG93Ow0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGlmIChiLnJlbGF0byAmJiAhYykgew0KICAgICAgICAgICAgICAgICAgICBpZiAoYi5yZWxhdG8uZGlzcGxheSAhPT0gc2hvdykgew0KICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlbGF0b3MgPSBPYmplY3Qua2V5cyhiLnJlbGF0byk7DQogICAgICAgICAgICAgICAgICAgICAgICByZWxhdG9zLnNwbGljZShyZWxhdG9zLmluZGV4T2YoJ2Rpc3BsYXknKSwgMSk7DQogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHJlbGF0b3MubGVuZ3RoOyBrKyspIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IHJlbGF0b3Nba107DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmFSZWxhW2RdLmlzQyA9IHRydWU7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICBiLnJlbGF0by5kaXNwbGF5ID0gc2hvdzsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAoYykgew0KICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJnW2VkXFw6dG9ndG9waWNpZD0nIiArIGEgKyAiJ10iKS5zdHlsZS5kaXNwbGF5ID0gc2hvdzsNCiAgICAgICAgICAgICAgICAgICAgaWYgKGMgPT09ICdtaW51cycpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHV0ZChiLCBhLCBzaG93KQ0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIGlmICgoYi5jYWxsIHx8IGIuYm91bmRhcnkgfHwgYi5zdW1tYXJ5KSAmJiBjID09PSAncGx1cycpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHV0ZChiLCBhLCBzaG93LCB0cnVlKQ0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGlmIChiLmNhbGwgJiYgIWMpIHsNCiAgICAgICAgICAgICAgICAgICAgdXRkKGIsIGEsIHNob3csIHRydWUpDQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGlmIChiLnN1bW1hcnkgJiYgIWMpIHsNCiAgICAgICAgICAgICAgICAgICAgdXRkKGIsIGEsIHNob3cpDQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGlmIChiLmJvdW5kYXJ5ICYmICFjKSB7DQogICAgICAgICAgICAgICAgICAgIHV0ZChiLCBhLCBzaG93KQ0KICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAgfQ0KICAgIGlmIChvYmouc3VtbWFyeSkgew0KICAgICAgICB2YXIgc3VtbWFyeXMgPSBPYmplY3Qua2V5cyhvYmouc3VtbWFyeSk7DQogICAgICAgIGlmICgoY2hlY2tJRCAhPT0gb2JqICYmIChvYmoudG9ndHlwZSA9PT0gJ21pbnVzJyB8fCAhb2JqLnRvZ3R5cGUpKSB8fCBjaGVja0lEID09PSBvYmopIHsNCiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc3VtbWFyeXMubGVuZ3RoOyBpKyspIHsNCiAgICAgICAgICAgICAgICB2YXIgYSA9IHN1bW1hcnlzW2ldLnNsaWNlKDEpOw0KICAgICAgICAgICAgICAgIHZhciBvc3AgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChhKS5nZXRBdHRyaWJ1dGUoJ2VkOnBhcmVudGlkJyk7DQogICAgICAgICAgICAgICAgaWYgKG9zcC5tYXRjaCgvXCwvKSkgew0KICAgICAgICAgICAgICAgICAgICB2YXIgb3NwYSA9IG9zcC5zcGxpdCgnLCcpOw0KICAgICAgICAgICAgICAgICAgICB2YXIgb3NwTCA9IDA7DQoNCiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBvc3BhLmxlbmd0aDsgaisrKSB7DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2hvdyA9PSAnbm9uZScpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQob3NwYVtqXSkuc3R5bGUuZGlzcGxheSAhPSAnbm9uZScpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3NwTCsrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKGEpLnN0eWxlLmRpc3BsYXkgIT0gJ25vbmUnKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9zcEwrKzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICBpZiAob3NwTCAhPT0gb3NwYS5sZW5ndGgpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIHZhciBiID0gb2JqLnN1bW1hcnlbc3VtbWFyeXNbaV1dOw0KICAgICAgICAgICAgICAgIC8vIGNvbnNvbGUubG9nKGEpOw0KICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKGEpLnN0eWxlLmRpc3BsYXkgPSBzaG93Ow0KICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgIGlmKGMpew0KICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJnW2VkXFw6dG9ndG9waWNpZD0nIithKyInXSIpLnN0eWxlLmRpc3BsYXk9c2hvdzsNCiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgaWYoYz09PSdtaW51cycpew0KICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgdXRkKGIsc2hvdykNCiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICBpZiAoYi5jYWxsJiZjPT09J3BsdXMnKSB7DQogICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICB1dGQoYixzaG93LHRydWUpDQogICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgaWYoYi5jYWxsJiYhYykgew0KICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICB1dGQoYixzaG93LHRydWUpDQogICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhiKS5sZW5ndGggIT09IDApIHsNCiAgICAgICAgICAgICAgICAgICAgdXRkKGIsIGEsIHNob3cpDQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAgfQ0KICAgIGlmIChvYmouYm91bmRhcnkpIHsNCiAgICAgICAgdmFyIGJvdW5kYXJ5cyA9IE9iamVjdC5rZXlzKG9iai5ib3VuZGFyeSk7DQogICAgICAgIGlmIChjaGVja0lEICE9PSBvYmopIHsNCiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYm91bmRhcnlzLmxlbmd0aDsgaSsrKSB7DQogICAgICAgICAgICAgICAgdmFyIGEgPSBib3VuZGFyeXNbaV0uc2xpY2UoMSk7DQogICAgICAgICAgICAgICAgdmFyIGIgPSBvYmouYm91bmRhcnlbYm91bmRhcnlzW2ldXTsNCiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmxvZyhhKTsNCiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChhKS5zdHlsZS5kaXNwbGF5ID0gc2hvdzsNCiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICBpZihjKXsNCiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiZ1tlZFxcOnRvZ3RvcGljaWQ9JyIrYSsiJ10iKS5zdHlsZS5kaXNwbGF5PXNob3c7DQogICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgIGlmKGM9PT0nbWludXMnKXsNCiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgIHV0ZChiLHNob3cpDQogICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgaWYgKGIuY2FsbCYmYz09PSdwbHVzJykgew0KICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgdXRkKGIsc2hvdyx0cnVlKQ0KICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgIGlmKGIuY2FsbCYmIWMpIHsNCiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgdXRkKGIsc2hvdyx0cnVlKQ0KICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LmtleXMoYikubGVuZ3RoICE9PSAwKSB7DQogICAgICAgICAgICAgICAgICAgIHV0ZChiLCBhLCBzaG93KQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KICAgIH0NCiAgICBpZiAoIW9jICYmIG9iai5jaGlsZCkgew0KICAgICAgICB2YXIgY2hpbGRzID0gT2JqZWN0LmtleXMob2JqLmNoaWxkKTsNCiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGlsZHMubGVuZ3RoOyBpKyspIHsNCiAgICAgICAgICAgIHZhciBhID0gY2hpbGRzW2ldLnNsaWNlKDEpOw0KICAgICAgICAgICAgdmFyIGIgPSBvYmouY2hpbGRbY2hpbGRzW2ldXTsNCiAgICAgICAgICAgIHZhciBjID0gYi50b2d0eXBlOw0KICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoYSkuc3R5bGUuZGlzcGxheSA9IHNob3c7DQogICAgICAgICAgICB2YXIgdFNQYXRoID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigicGF0aFtlZFxcOnRvc3VwZXJpZD0nIiArIGEgKyAiJ10iKTsNCiAgICAgICAgICAgIGlmICh0U1BhdGgpIHsNCiAgICAgICAgICAgICAgICB0U1BhdGguc3R5bGUuZGlzcGxheSA9IHNob3c7DQogICAgICAgICAgICB9DQogICAgICAgICAgICB2YXIgbm90ZVRpcCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoImdbZWRcXDpub3RldG89JyIgKyBhICsgIiddIik7DQogICAgICAgICAgICBpZiAobm90ZVRpcCkgew0KICAgICAgICAgICAgICAgIG5vdGVUaXAuc3R5bGUuZGlzcGxheSA9IHNob3c7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBpZiAoYi5yZWxhZnJvbSAmJiAhYykgew0KICAgICAgICAgICAgICAgIGlmIChiLnJlbGFmcm9tLmRpc3BsYXkgIT09IHNob3cpIHsNCiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbGFmcm9tcyA9IE9iamVjdC5rZXlzKGIucmVsYWZyb20pOw0KICAgICAgICAgICAgICAgICAgICByZWxhZnJvbXMuc3BsaWNlKHJlbGFmcm9tcy5pbmRleE9mKCdkaXNwbGF5JyksIDEpOw0KICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHJlbGFmcm9tcy5sZW5ndGg7IGsrKykgew0KICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSByZWxhZnJvbXNba107DQogICAgICAgICAgICAgICAgICAgICAgICBleHRyYVJlbGFbZF0uaXNDID0gdHJ1ZTsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICBiLnJlbGFmcm9tLmRpc3BsYXkgPSBzaG93Ow0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIGlmIChiLnJlbGF0byAmJiAhYykgew0KICAgICAgICAgICAgICAgIGlmIChiLnJlbGF0by5kaXNwbGF5ICE9PSBzaG93KSB7DQogICAgICAgICAgICAgICAgICAgIHZhciByZWxhdG9zID0gT2JqZWN0LmtleXMoYi5yZWxhdG8pOw0KICAgICAgICAgICAgICAgICAgICByZWxhdG9zLnNwbGljZShyZWxhdG9zLmluZGV4T2YoJ2Rpc3BsYXknKSwgMSk7DQogICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgcmVsYXRvcy5sZW5ndGg7IGsrKykgew0KICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSByZWxhdG9zW2tdOw0KICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmFSZWxhW2RdLmlzQyA9IHRydWU7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgYi5yZWxhdG8uZGlzcGxheSA9IHNob3c7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgaWYgKGMpIHsNCiAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJnW2VkXFw6dG9ndG9waWNpZD0nIiArIGEgKyAiJ10iKS5zdHlsZS5kaXNwbGF5ID0gc2hvdzsNCiAgICAgICAgICAgICAgICBpZiAoYyA9PT0gJ21pbnVzJykgew0KICAgICAgICAgICAgICAgICAgICB1dGQoYiwgYSwgc2hvdykNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgaWYgKChiLmNhbGwgfHwgYi5ib3VuZGFyeSB8fCBiLnN1bW1hcnkpICYmIGMgPT09ICdwbHVzJykgew0KICAgICAgICAgICAgICAgICAgICB1dGQoYiwgYSwgc2hvdywgdHJ1ZSkNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9DQogICAgICAgICAgICBpZiAoYi5jYWxsICYmICFjKSB7DQogICAgICAgICAgICAgICAgdXRkKGIsIGEsIHNob3csIHRydWUpDQogICAgICAgICAgICB9DQogICAgICAgICAgICBpZiAoYi5zdW1tYXJ5ICYmICFjKSB7DQogICAgICAgICAgICAgICAgdXRkKGIsIGEsIHNob3cpDQogICAgICAgICAgICB9DQogICAgICAgICAgICBpZiAoYi5ib3VuZGFyeSAmJiAhYykgew0KICAgICAgICAgICAgICAgIHV0ZChiLCBhLCBzaG93KQ0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAgfQ0KfQ0KDQpmdW5jdGlvbiBleHRyYVJlbGFGaW4oKSB7DQogICAgdmFyIGV4dHJha2V5cyA9IE9iamVjdC5rZXlzKGV4dHJhUmVsYSk7DQogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBleHRyYWtleXMubGVuZ3RoOyBpKyspIHsNCiAgICAgICAgdmFyIGV4dHJhT2JqID0gZXh0cmFSZWxhW2V4dHJha2V5c1tpXV07DQogICAgICAgIGlmIChleHRyYU9iai5pc0MgPT09IHRydWUpIHsNCiAgICAgICAgICAgIHZhciBmc2hvdyA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKGV4dHJhT2JqLmZyb21pZCkuc3R5bGUuZGlzcGxheSAhPT0gJ25vbmUnID8gdHJ1ZSA6IGZhbHNlOw0KICAgICAgICAgICAgdmFyIHRzaG93ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoZXh0cmFPYmoudG9pZCkuc3R5bGUuZGlzcGxheSAhPT0gJ25vbmUnID8gdHJ1ZSA6IGZhbHNlOw0KICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoZXh0cmFPYmouaWQpLnN0eWxlLmRpc3BsYXkgPSBmc2hvdyAmJiB0c2hvdyA/ICdibG9jaycgOiAnbm9uZSc7DQogICAgICAgICAgICBleHRyYVJlbGFbZXh0cmFrZXlzW2ldXS5pc0MgPSBmYWxzZTsNCiAgICAgICAgfQ0KICAgIH0NCn0='))</script>
  </body>
</html>
